Pagina.implement
({
    stringOfCollitionAreaAtIndex: function(index)
    {
        if(index >= this.collition_areas.length){
            // fuera de rango
            return "";
        }
        var area = this.collition_areas[index];
        return "[{x: " + area[0].x + ", y: " +  area[0].y + "}, {x: " +
               area[1].x + ", y: " + area[1].y + "}]";
    },

    stringOfTextAtIndex: function(index)
    {
        if(index >= this.texts.length){
            return "";
        }

        return this.texts[index];
    },

    editTextOfCurrentBox: function(newText)
    {
        if(this.current_index == -1){
            return;
        }

        this.texts[this.current_index] = newText;
        this.current_text = this.texts[this.current_index];
    }
}); 

